package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmLianJieShuJuKuMapper;
import com.ruoyi.web.tdm.domain.TdmLianJieShuJuKu;
import com.ruoyi.web.tdm.service.ITdmLianJieShuJuKuService;

/**
 * ID-12 -21 -31 链接数据库Service业务层处理
 * 
 * @author ly
 * @date 2022-03-11
 */
@Service
public class TdmLianJieShuJuKuServiceImpl implements ITdmLianJieShuJuKuService 
{
    @Autowired
    private TdmLianJieShuJuKuMapper tdmLianJieShuJuKuMapper;

    /**
     * 查询ID-12 -21 -31 链接数据库
     * 
     * @param id ID-12 -21 -31 链接数据库主键
     * @return ID-12 -21 -31 链接数据库
     */
    @Override
    public TdmLianJieShuJuKu selectTdmLianJieShuJuKuById(Long id)
    {
        return tdmLianJieShuJuKuMapper.selectTdmLianJieShuJuKuById(id);
    }

    /**
     * 查询ID-12 -21 -31 链接数据库列表
     * 
     * @param tdmLianJieShuJuKu ID-12 -21 -31 链接数据库
     * @return ID-12 -21 -31 链接数据库
     */
    @Override
    public List<TdmLianJieShuJuKu> selectTdmLianJieShuJuKuList(TdmLianJieShuJuKu tdmLianJieShuJuKu)
    {
        return tdmLianJieShuJuKuMapper.selectTdmLianJieShuJuKuList(tdmLianJieShuJuKu);
    }

    /**
     * 新增ID-12 -21 -31 链接数据库
     * 
     * @param tdmLianJieShuJuKu ID-12 -21 -31 链接数据库
     * @return 结果
     */
    @Override
    public int insertTdmLianJieShuJuKu(TdmLianJieShuJuKu tdmLianJieShuJuKu)
    {
        tdmLianJieShuJuKu.setCreateTime(DateUtils.getNowDate());
        return tdmLianJieShuJuKuMapper.insertTdmLianJieShuJuKu(tdmLianJieShuJuKu);
    }

    /**
     * 修改ID-12 -21 -31 链接数据库
     * 
     * @param tdmLianJieShuJuKu ID-12 -21 -31 链接数据库
     * @return 结果
     */
    @Override
    public int updateTdmLianJieShuJuKu(TdmLianJieShuJuKu tdmLianJieShuJuKu)
    {
        tdmLianJieShuJuKu.setUpdateTime(DateUtils.getNowDate());
        return tdmLianJieShuJuKuMapper.updateTdmLianJieShuJuKu(tdmLianJieShuJuKu);
    }

    /**
     * 批量删除ID-12 -21 -31 链接数据库
     * 
     * @param ids 需要删除的ID-12 -21 -31 链接数据库主键
     * @return 结果
     */
    @Override
    public int deleteTdmLianJieShuJuKuByIds(Long[] ids)
    {
        return tdmLianJieShuJuKuMapper.deleteTdmLianJieShuJuKuByIds(ids);
    }

    /**
     * 删除ID-12 -21 -31 链接数据库信息
     * 
     * @param id ID-12 -21 -31 链接数据库主键
     * @return 结果
     */
    @Override
    public int deleteTdmLianJieShuJuKuById(Long id)
    {
        return tdmLianJieShuJuKuMapper.deleteTdmLianJieShuJuKuById(id);
    }
}
